/*
 * @描述: 城市管理 service层
 * @Author: /zlh
 * @Date: 2021-06-17 09:26:22
 * @Last Modified by: zlh
 * @Last Modified time: 2021-06-17 11:55:58
 */

import { stringify } from 'qs';
import request from '@/utils/request';
import { secMap } from '@/configs/api.map';

const { api_getCityByPage, api_saveCityBuzzConfig,
  api_deletecityBuzzConfigByCode, api_getCityBuzz, api_getAllCity, api_getCityPaymentList,
  api_getCityMaintenaceTip, api_getBindFailList, api_getTieCardFailLog, api_decryptCard,
  api_saveCityPayment, api_saveMaintenanceInfor } = secMap;
/**
 * @description 获取开通城市列表
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} params
 * @returns
 */
export async function getCityByPage(params) {
  return request(api_getCityByPage, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

/**
 * @description 查询城市关联业务配置项
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} params
 * @returns
 */
export async function getCityBuzz(params) {
  return request(api_getCityBuzz, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 保存城市关联业务
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} params
 * @returns
 */
export async function saveCityBuzzConfig(params) {
  return request(api_saveCityBuzzConfig, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 删除城市关联业务
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} params
 * @returns
 */
export async function deletecityBuzzConfigByCode(params) {
  return request(api_deletecityBuzzConfigByCode, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 获取城市缴费管理列表
 * @author zlh
 * @date 2021-04-29
 * @export
 * @param {object} params
 * @returns
 */
export async function getCityPaymentList(params) {
  return request(api_getCityPaymentList, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 删除城市缴费管理列表数据
 * @author zlh
 * @date 2021-04-29
 * @export
 * @param {object} params
 * @returns
 */
export async function saveCityPayment(params) {
  return request(api_saveCityPayment, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 下拉城市选项列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function getAllCity(params) {
  return request(api_getAllCity, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 获取城市维护信息列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function getCityMaintenaceTip(params) {
  return request(api_getCityMaintenaceTip, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 保存城市维护信息列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function saveMaintenanceInfor(params) {
  return request(api_saveMaintenanceInfor, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 绑卡失败查询列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function getBindFailList(params) {
  return request(api_getBindFailList, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 卡操作日志查询列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function getTieCardFailLog(params) {
  return request(api_getTieCardFailLog, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
/**
 * @description 解密社保、公积金卡
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} params
 * @returns
 */
export async function decryptCard(params) {
  return request(api_decryptCard, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}